package tech.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tech.aistar.entity.MyPost;
import tech.aistar.mapper.MyPostMapper;
import tech.aistar.service.IMyPostService;

import java.util.List;

@Service
@Transactional
public class MyPostServiceImpl implements IMyPostService {
    @Autowired
    private MyPostMapper myPostMapper;

    @Override
    public List<MyPost> findAllById(Integer id) {
        List<MyPost> posts = myPostMapper.findAllById(id);
        return posts;
    }

    @Override
    public void addPost(MyPost post) {
        myPostMapper.addPost(post);
    }

    @Override
    public void delPost(Integer gId) {
        myPostMapper.delPost(gId);
    }
}
